version: 1.0.{build}

environment:
  global:
    CTEST_OUTPUT_ON_FAILURE: True
  matrix:
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
      VS_GENERATOR: Visual Studio 14 2015
      CONAN_VC_VER: 14
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      VS_GENERATOR: Visual Studio 15 2017
      CONAN_VC_VER: 15
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
      VS_GENERATOR: Visual Studio 16 2019
      CONAN_VC_VER: 16

install:

- ps: >-
    $Env:PATH = "C:\Python38-x64;C:\Python38-x64\Scripts;$Env:PATH"
    python -m pip install conan
    mkdir build
    cd build
    conan install -o gtest:shared=False -s arch=x86_64 -s compiler="Visual Studio" -s compiler.version=$Env:CONAN_VC_VER -s compiler.runtime=MT -s build_type=Release --build=missing ..

build_script:
- ps: >-
    cmake -G "$Env:VS_GENERATOR" -A x64 -DCONAN=On -DBUILD_SHARED_LIBS=Off ..
    cmake --build . --config ReleaseStatic

test_script:
- ps: cmake --build . --config ReleaseStatic --target RUN_TESTS

